# refer to http://docs.celeryproject.org/en/latest/django/first-steps-with-django.html

import os
import sys
from celery import Celery

cwd = os.getcwd()
sys.path.append(cwd)
sys.path.append('%s/../pylib' % cwd)

# set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'project.settings')

app = Celery('momselfApp')

# Using a string here means the worker will not have to
# pickle the object when using Windows.

app.config_from_object('project.celerytasks.celery_worker_cfg')


# app.autodiscover_tasks(lambda: settings.INSTALLED_APPS,
#                        related_name="celery_tasks")
